package com.zxl.designpattern.creator.builder;

/**
 * @author zxl
 * @version 1.0
 * @description 指挥者类，不关心具体的建造者实现，只负责调用建造者的方法，构建产品。
 * @date 2025/6/1 10:02
 */
public class Director {

    /**
     * 创建小轿车
     * @param builder
     */
    public void constructSedanCar(IBuilder builder) {
        builder.buildEngine();
        builder.buildWheels();
        builder.buildBody();
    }

    /**
     * 创建卡车
     * @param builder
     */
    public void constructTruck(IBuilder builder) {
        builder.buildEngine();
        builder.buildWheels();
        builder.buildBody();
    }
}
